<template>
  <div class="body0">
    <el-card style="margin: 0 auto;padding: 0">
      <div class="searchbar">
        <img class="biglogo" src="../../assets/imgs/logo-01-b-01.png">
        <el-button style="float: right;margin-top: 15px;margin-left: 20px;"  icon="el-icon-shopping-cart-2" @click="tocart">我的购物车</el-button>
        <el-button style="float: right;margin-top: 15px;margin-left: 20px;"  icon="el-icon-shopping-bag-2" @click="toorder">我的订单</el-button>
        <div class="search" style="width: 450px;">
          <el-input placeholder="请输入商品名" class="input-with-select">
            <el-button slot="append" icon="el-icon-search"></el-button>
          </el-input>
        </div>
      </div>
    </el-card>
    <div class="product-pic" style="width: 1190px;margin: 0 auto">
      <el-row gutter="40">
        <el-col span="12">
            <el-carousel style="height: 400px;width: 400px;margin: 20px 0 20px 80px;">
              <el-carousel-item style="height: 400px;"><img style="height: 100%;width: 100%" src="../../assets/stx-mall/detail/img.png"></el-carousel-item>
              <el-carousel-item style="height: 400px;"><img style="height: 100%;width: 100%" src="../../assets/stx-mall/detail/img_1.png"></el-carousel-item>
              <el-carousel-item style="height: 400px;"><img style="height: 100%;width: 100%" src="../../assets/stx-mall/detail/img_2.png"></el-carousel-item>
              <el-carousel-item style="height: 400px;"><img style="height: 100%;width: 100%" src="../../assets/stx-mall/detail/img_3.png"></el-carousel-item>
            </el-carousel>
        </el-col>
        <el-col style="text-align: left" span="12">
          <h1 style="font-size: 20px;">跑步机家用降噪可折叠免安装宽大跑台（支持HUAWEI HiLink）</h1>
          <p style="color: rgb(225,37,27)">华为健康APP一触即连，智能物联，机身全折叠，急速发货免安装</p>
          <el-card style="height: 30px;margin-bottom: 0;border: none;background-color: rgb(225,37,27);border-radius: 0" shadow="never">
            <p style="margin: 2px 0 2px 2px;color: rgb(255, 225, 52);position: relative;bottom: 18px;">百亿补贴</p>
          </el-card>
          <el-card style="height: 120px;margin: 0 0 20px 0;border: none;;border-radius: 0;background-color: rgb(243, 243, 243);padding: 10px;box-sizing: border-box;" shadow="never">
            <div style="position: relative;bottom: 20px;">
              <span style="margin-top: 20px;margin-bottom: 20px; font-size: 15px;">补贴价:</span><span style="color: crimson;font-size: 25px;">￥1549</span><br>
              <span style="margin-top: 20px;font-size: 15px;color: rgba(0,0,0,0.5);text-decoration-line: line-through">原价:</span><span style="color: rgba(0,0,0,0.5);font-size: 15px;text-decoration-line: line-through">￥9999</span>
              <p style="">优惠券：</p>
              <el-button style="width: 100px;height: 35px;font-size: 5px;position: relative;left: 70px;bottom: 40px;" type="danger" plain>点此领取</el-button>
            </div>
          </el-card>
          <span >选择收货地址:</span>
          <el-cascader style="margin-left: 20px;height: 20px;" :options="options" clearable></el-cascader><br>
          <p>
            <p style="margin-top: 20px;float: left">选择商品件数:</p>
            <el-input-number style="float: left;margin-top: 18px;margin-left: 20px;" size="mini" v-model="num4"></el-input-number>
          </p>
          <p style="position: relative;top: 70px;right: 250px;">
            <el-button style="background-color: rgb(225, 37, 27);color: white;">加入购物车</el-button>
            <el-button style="background-color: rgb(225, 37, 27);color: white;margin-left: 20px">立即购买</el-button>
          </p>
        </el-col>
      </el-row>
      <el-divider></el-divider>
      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
        <el-tab-pane label="商品详情" name="first">
          <el-descriptions title="参数信息">
            <el-descriptions-item label="商品名称">跑步机</el-descriptions-item>
            <el-descriptions-item label="商品编号">100005558660</el-descriptions-item>
            <el-descriptions-item label="商品毛重">57.5kg</el-descriptions-item>
          </el-descriptions>
          <el-divider></el-divider>
          <div class="demo-image">
            <el-image  v-for="(item, index) in ImgList" :key="index" :src="item.imgUrl"></el-image>
          </div>
        </el-tab-pane>
        <el-tab-pane label="商品评价" name="second">
          <div style="margin-left: 10px;text-align: left">
            <p>好评度</p>
            <h1 style="color: rgb(225, 37, 27);font-size: 40px;margin-top: 10px;">97%</h1>
          </div>
          <el-divider style="margin-bottom: 40px;">评价详情</el-divider>
          <!--商品评价开始-->
          <el-descriptions style="margin-right: 20px;" :column="2">
            <el-descriptions-item label="用户名">kooriookami</el-descriptions-item>
            <el-descriptions-item label="评分"><el-rate
                v-model="value"
                disabled
                show-score
                text-color="#ff9900"
                score-template="{value}">
            </el-rate></el-descriptions-item>
            <el-descriptions-item label="评价信息">锻炼起来一会就一身汗，就是担心吃灰。</el-descriptions-item>
            <el-descriptions-item label="评价截图">
              <el-image
                  style="width: 100px; height: 100px"
                  :src="url"
                  :preview-src-list="srcList">
              </el-image>
            </el-descriptions-item>
          </el-descriptions>
          <!--商品评价结束-->
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    tocart(){
      this.$router.push('cart')
    },
    toorder(){
      this.$router.push('order')
    },
  },
  data() {
    return {
      url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
      srcList: [
        'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
        'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
      ],
      value: 3.7,
      ImgList:[
        {imgUrl:require("../../assets/stx-mall/detail/detail-detail/img.png")},
        {imgUrl:require("../../assets/stx-mall/detail/detail-detail/img_1.png")},
        {imgUrl:require("../../assets/stx-mall/detail/detail-detail/img_2.png")},
        {imgUrl:require("../../assets/stx-mall/detail/detail-detail/img_3.png")},
        {imgUrl:require("../../assets/stx-mall/detail/detail-detail/img_4.png")},
      ],
      activeName: 'first',
      num4: 1,
      options: [{
        value: 'zhinan',
        label: '指南',
        children: [{
          value: 'shejiyuanze',
          label: '设计原则',
          children: [{
            value: 'yizhi',
            label: '一致'
          }, {
            value: 'fankui',
            label: '反馈'
          }, {
            value: 'xiaolv',
            label: '效率'
          }, {
            value: 'kekong',
            label: '可控'
          }]
        }, {
          value: 'daohang',
          label: '导航',
          children: [{
            value: 'cexiangdaohang',
            label: '侧向导航'
          }, {
            value: 'dingbudaohang',
            label: '顶部导航'
          }]
        }]
      }, {
        value: 'zujian',
        label: '组件',
        children: [{
          value: 'basic',
          label: 'Basic',
          children: [{
            value: 'layout',
            label: 'Layout 布局'
          }, {
            value: 'color',
            label: 'Color 色彩'
          }, {
            value: 'typography',
            label: 'Typography 字体'
          }, {
            value: 'icon',
            label: 'Icon 图标'
          }, {
            value: 'button',
            label: 'Button 按钮'
          }]
        }, {
          value: 'form',
          label: 'Form',
          children: [{
            value: 'radio',
            label: 'Radio 单选框'
          }, {
            value: 'checkbox',
            label: 'Checkbox 多选框'
          }, {
            value: 'input',
            label: 'Input 输入框'
          }, {
            value: 'input-number',
            label: 'InputNumber 计数器'
          }, {
            value: 'select',
            label: 'Select 选择器'
          }, {
            value: 'cascader',
            label: 'Cascader 级联选择器'
          }, {
            value: 'switch',
            label: 'Switch 开关'
          }, {
            value: 'slider',
            label: 'Slider 滑块'
          }, {
            value: 'time-picker',
            label: 'TimePicker 时间选择器'
          }, {
            value: 'date-picker',
            label: 'DatePicker 日期选择器'
          }, {
            value: 'datetime-picker',
            label: 'DateTimePicker 日期时间选择器'
          }, {
            value: 'upload',
            label: 'Upload 上传'
          }, {
            value: 'rate',
            label: 'Rate 评分'
          }, {
            value: 'form',
            label: 'Form 表单'
          }]
        }, {
          value: 'data',
          label: 'Data',
          children: [{
            value: 'table',
            label: 'Table 表格'
          }, {
            value: 'tag',
            label: 'Tag 标签'
          }, {
            value: 'progress',
            label: 'Progress 进度条'
          }, {
            value: 'tree',
            label: 'Tree 树形控件'
          }, {
            value: 'pagination',
            label: 'Pagination 分页'
          }, {
            value: 'badge',
            label: 'Badge 标记'
          }]
        }, {
          value: 'notice',
          label: 'Notice',
          children: [{
            value: 'alert',
            label: 'Alert 警告'
          }, {
            value: 'loading',
            label: 'Loading 加载'
          }, {
            value: 'message',
            label: 'Message 消息提示'
          }, {
            value: 'message-box',
            label: 'MessageBox 弹框'
          }, {
            value: 'notification',
            label: 'Notification 通知'
          }]
        }, {
          value: 'navigation',
          label: 'Navigation',
          children: [{
            value: 'menu',
            label: 'NavMenu 导航菜单'
          }, {
            value: 'tabs',
            label: 'Tabs 标签页'
          }, {
            value: 'breadcrumb',
            label: 'Breadcrumb 面包屑'
          }, {
            value: 'dropdown',
            label: 'Dropdown 下拉菜单'
          }, {
            value: 'steps',
            label: 'Steps 步骤条'
          }]
        }, {
          value: 'others',
          label: 'Others',
          children: [{
            value: 'dialog',
            label: 'Dialog 对话框'
          }, {
            value: 'tooltip',
            label: 'Tooltip 文字提示'
          }, {
            value: 'popover',
            label: 'Popover 弹出框'
          }, {
            value: 'card',
            label: 'Card 卡片'
          }, {
            value: 'carousel',
            label: 'Carousel 走马灯'
          }, {
            value: 'collapse',
            label: 'Collapse 折叠面板'
          }]
        }]
      }, {
        value: 'ziyuan',
        label: '资源',
        children: [{
          value: 'axure',
          label: 'Axure Components'
        }, {
          value: 'sketch',
          label: 'Sketch Templates'
        }, {
          value: 'jiaohu',
          label: '组件交互文档'
        }]
      }]
    }
  },
}
</script>
<style>
.demo-image{
  margin-top: 20px;
}
.margin-top{
  background-color: unset;
}
.el-divider el-divider--horizontal{
  margin: 100px 0 100px 0;
}
.category>.el-card__body{
  padding: 10px;
}

.el-carousel__item is-active is-animating{
  height: 400px;width: 400px;
}
.searchbar{
  width: 900px;margin: 0 auto;height: 70px;
}
.search{
  float: right;margin-top: 15px;
}
.biglogo{
  width: 100px;float: left;
}

.el-main{
  margin: 0;padding: 0;
}


</style>